package com.lvmama.rhino.pojo;

import java.util.Date;

public class PageMonitor extends BasePojo{

    /**
     * 
     */
    private static final long serialVersionUID = -4568795116418256622L;
    
    /**
     * 省份
     */
    private String province;
    
    /**
     * 城市
     */
    private String city;
    
    /**
     * 运营商
     */
    private String operators;
    
    /**
     * 品类
     */
    private String category_id;
    
    /**
     * 网络制式,2g,3g,4g,wifi,none
     */
    private String network_type;
    
    /**
     * 页面加载时长
     */
    private Double load_time;
    
    /**
     * 页面总加载时长
     */
    private Double total_load_time;
        
    /**
     * 是否为H5访问，0-H5，1-IOS, 2-ANDROID
     */
    private String is_lv;
    
    /**
     * 创建时间
     */
    private Date create_date;
    
    /**
     * 访问次数
     */
    private Long visit_times;
    
    /**
     * 占比
     */
    private String proportion;
    
    /**
     * 平均加载时长
     */
    private Double average_time;
    
    /**
     * 平均时间
     */
    private String average_time_str;
    
    /**
     * url
     */
    private String url;
    
    
    /**
     * 区间0(0-1)、1(1-2)、2(2-3)、3(3-4)、4(4-5)、5(5-8)、6(>8)
     */
    private String timeInterval;
    
   /**
    * 访问量
    */
    private Double  amount;
    
    /**
     * 页面的pageCode
     */
    private String page_code;

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getOperators() {
        return operators;
    }

    public void setOperators(String operators) {
        switch (operators) {
            case "CM":
                this.operators = "移动";
                break;
            case "CU":
                this.operators = "联通";
                break;
            case "CT":
                this.operators = "电信";
                break;
            default:
                this.operators = "NONE";
        }
    }

    public String getCategory_id() {
        return category_id;
    }

    public void setCategory_id(String category_id) {
        this.category_id = category_id;
    }

    public String getNetwork_type() {
        
        return network_type;
    }

    public void setNetwork_type(String network_type) {
         if(network_type.matches("[0-9]{2,10}")) {
             this.network_type = "NONE";
         }
         else {
             this.network_type = network_type;
         }
    }
    
    public Double getLoad_time() {
        return load_time;
    }

    public void setLoad_time(Double load_time) {
        this.load_time = load_time;
    }

    public Double getTotal_load_time() {
        return total_load_time;
    }

    public void setTotal_load_time(Double total_load_time) {
        this.total_load_time = total_load_time;
    }

    public String getIs_lv() {
        return is_lv;
    }

    public void setIs_lv(String is_lv) {
    	 switch (is_lv) {
	         case "0":
	             this.is_lv = "H5";
	             break;
	         case "1":
	             this.is_lv = "IOS";
	             break;
	         case "2":
	             this.is_lv = "Android";
	             break;
	         default:
	             this.is_lv = "NONE";
     }
    }

    public Date getCreate_date() {
        return create_date;
    }

    public void setCreate_date(Date create_date) {
        this.create_date = create_date;
    }

    public Long getVisit_times() {
        return visit_times;
    }

    public void setVisit_times(Long visit_times) {
        this.visit_times = visit_times;
    }

    public String getProportion() {
        return proportion;
    }

    public void setProportion(String proportion) {
        this.proportion = proportion;
    }

    public Double getAverage_time() {
        return average_time;
    }

    public void setAverage_time(Double average_time) {
        this.average_time = average_time;
    }

    public String getAverage_time_str() {
        return average_time_str;
    }

    public void setAverage_time_str(String average_time_str) {
        this.average_time_str = average_time_str;
    }

    public String getPage_code() {
        return page_code;
    }

    public void setPage_code(String page_code) {
        this.page_code = page_code;
    }

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTimeInterval() {
		return timeInterval;
	}

	public void setTimeInterval(String timeInterval) {
		this.timeInterval = timeInterval;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	
    
}
